package entity;

import java.util.Observable;

public abstract class ERegister extends Observable {
	protected String name, description, unit, dataType;
	protected int address;
	protected boolean plotable;
	
	public ERegister(String name, int address, String dataType, 
			String description, boolean plotable, String unit) {
		this.name = name;
		this.address = address;
		this.dataType = dataType;
		this.description = description;
		this.plotable = plotable;
		this.unit = unit;
			System.out.print(name + " " + address + "\n");
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public int getAddress() {
		return address;
	}
	
	public void setAddress(int address) {
		this.address = address;
	}
	
	public String getDataType() {
		return dataType;
	}
	
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public boolean isPlotable() {
		return plotable;
	}
	
	public String getUnit() {
		return unit;
	}
	
	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	public abstract Object getValue();
	public abstract void setValue(byte b0, byte b1, byte b2, byte b3);
}
